import request from '@/utils/request'

// 查询药品预盘点表列表 (分页)
export function selectPageDrugInventoryCheckPreparation(query) {
  return request({
    url: '/drug/drugInventoryCheckPreparation/selectPage',
    method: 'get',
    params: query
  })
}

// 查询药品预盘点表列表 (不分页)
export function listDrugInventoryCheckPreparation(query) {
  return request({
    url: '/drug/drugInventoryCheckPreparation/list',
    method: 'get',
    params: query
  })
}

// 查询药品预盘点表详细
export function getDrugInventoryCheckPreparation(id) {
  return request({
    url: '/drug/drugInventoryCheckPreparation/' + id,
    method: 'get'
  })
}

// 新增药品预盘点表
export function addDrugInventoryCheckPreparation(data) {
  return request({
    url: '/drug/drugInventoryCheckPreparation',
    method: 'post',
    data: data
  })
}

// 修改药品预盘点表
export function updateDrugInventoryCheckPreparation(data) {
  return request({
    url: '/drug/drugInventoryCheckPreparation',
    method: 'put',
    data: data
  })
}

// 删除药品预盘点表
export function delDrugInventoryCheckPreparation(inventoryNo, orgId) {
  return request({
    url: '/drug/drugInventoryCheckPreparation/' + inventoryNo + "/" + orgId,
    method: 'delete'
  })
}


// 按申请单分组查询盘点记录
export function selectGroupInventoryNoPreparation(query) {
  return request({
    url: '/drug/drugInventoryCheckPreparation/selectGroupInventoryNo',
    method: 'get',
    params: query
  })
}

export function getInventoryCheckListPreparation(query) {
  return request({
    url: '/drug/drugInventoryCheckPreparation/getInventoryCheckList',
    method: 'get',
    params: query
  })
}
